<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<h2>当前计数：{{counter}}</h2>
			<button v-on:click="counter++">+</button>
			<button @click="counter--">-</button>
			<br/>
			<button v-on:click="increment">+</button>
			<button @click="decrement">-</button>
		</div>

		<script src="../vue.js"></script>
		<script type="text/javascript">
			const app = new Vue({
				el: '#app',
				data: {
					counter: 0
				},
				methods: {
					increment() {
						this.counter++
					},
					decrement() {
						this.counter--
					}
				}
			});
		</script>
	</body>
</html>
